import synonyms
class FastSynonyms(): #近义词不靠谱
    def __init__(self):
        return
    def cut(self,str):
        words=synonyms.seg(str)
        print(words)
    def similar(self,str):
        words=synonyms.nearby(str)
        print('明天近似如下：')
        for word in words:
            print(word)

    def display(self, str):
        synonyms.display(str)
if __name__ == "__main__":
    fj = FastSynonyms()
    str='厦门明天会不会下雨'
    str2='明天'
    fj.cut(str)
    fj.display(str2)
